My prior application Ser. No. 467,048, filed May 5, 1974, together with Ernst Schulze, includes a group of 1-substituted 6-phenyl-1H-pyrazolo[3,4-b]pyridines which are produced by the reaction of 1-substituted-5-amino-pyrazoles with a benzoylacetic acid ester. The same reaction of a benzoylacetic acid ester with 2-substituted 5-aminopyrazoles unexpectedly yields 5-phenylpyrazolo[1,5-a]-pyrimidin-7(1H)ones. In order to obtain the 2-substituted 6-phenyl-2H-pyrazolo[3,4-b]pyridines of this invention, rearrangement of the pyrazolopyridine is required. Thus the method of ring formation of 2H-pyrazolopyridines is different from the method of producing the 1H series.